<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <ul>
        <li v-for="(item,index) in arr">索引{{index}},{{item}},a</li>
      </ul>
      <ul>
        <li v-for="(v,k,i) in obj">{{v}},{{k}},{{i}}</li>
      </ul>
    </div>
  </body>
</html>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
  const vm = new Vue({
    el: "#app",
    data: {
      msg: "无奋斗，不青春",
      arr: ["吃饭", "睡觉", "写代码"],
      obj: {
        name: "李磊",
        age: 18,
        hobby: "代码",
      },
    },
  });
</script>
